<script language="javascript" src="{$base_dir}js/colorpicker2.js"></script>
<SCRIPT LANGUAGE="JavaScript">
var cp2 = new ColorPicker(); // DIV style
</SCRIPT>
<form name="users" method="post" action="{$TOP_ACTION}">
<table>
	<tr>
		<td colspan="2">
		{if $error}
			{$error}<br><br>
		{/if}
		{if $messages}
		{$messages->render()}<br><br>
		{/if}
		</td>
	</tr>
	<tr>
		<td>{l}Username{/l}:&nbsp;</td>
		<td><input type="text" name="username" size="15" value="{$user->get_username()}"></td>
	</tr>
	<tr>
		<td>{l}Nickname{/l}:&nbsp;</td>
		<td><input type="text" name="nickname" size="15" value="{$user->get_nickname()}"></td>
	</tr>
	<tr>
		<td>{l}Color{/l}:&nbsp;</td>
		<td><input type="text" name="color" size="15" value="{$user->get_color()}"><A HREF="#" onClick="cp2.select(document.users.color,'pick2');return false;" NAME="pick2" ID="pick2">Pick</A></td>
	</tr>
	<tr>
		<td>{l}Default Location{/l}:</td>
		<td>{html_options name="default_location_id" options=$rooms_practice_array selected=$user->get_default_location_id()}</td>
	</tr>
	<tr>
		<td>{l}Roles{/l}:&nbsp;</td>
		<td>{html_options name="groups[]" options=$groups selected=$user->get_group_ids() multiple="true" size="4"}</td>
	</tr>
	<!--<tr>
		<td>{l}Password{/l}:&nbsp;</td>
		<td><input type="password" name="password" size="15"></td>
	</tr>
	<tr>
		<td>{l}Password (match){/l}:&nbsp;</td>
		<td><input type="password" name="password2" size="15"></td>
	</tr>-->
	<tr>
		<td colspan="2" align="center"><br>
		{if $user->id > 0}
		<input type="submit" name="submit" value="Update User">
		{else}
		<input type="submit" name="submit" value="Add User">
		{/if}
		</td>
	</tr>
</table>
<input type="hidden" name="process" value="{$PROCESS}">
</form>
<SCRIPT LANGUAGE="JavaScript">cp2.writeDiv()</SCRIPT>
